<?php 
//all this file does is loop through the config and toss it all back to Flash
include_once('./db.php');

$link = dbConnect();

//query and loop the results
$result = mysql_query("SELECT * FROM ".TABLE_PREFIX."_config");

if(!$result){
	//tell flash we are broken
	echo "output=configError";
}else{
	$output = "output=success";
	
	for($i = 0; $i < mysql_num_rows($result); $i++){
		$data = mysql_fetch_object($result);
		
		//generate the name/value
		$output .= "&".$data->configName."=".urlencode(stripslashes($data->configValue));
	}
	
	//add in the announcement display order
	$output .= "&ANNOUCEMENT_DISPLAY_ORDER=".ANNOUCEMENT_DISPLAY_ORDER;
	
	//send it off to flash
	echo $output;
}

//let mysql go back to sleep... Shhh
mysql_close($link);
?>